﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using System.Net.Security;
using System.ServiceModel.Description;
using System.Security.Permissions;
using System.Security.Cryptography.X509Certificates;

namespace ChatContrats
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
     [ServiceContract(Namespace = "ChatWcf",
        Name = "ChatDVP",
        CallbackContract = typeof(IChatWCFRappel),
        SessionMode = SessionMode.Required, ProtectionLevel=ProtectionLevel.None)]
    public interface IChatWCF
    {

        [OperationContract(IsInitiating = true, IsTerminating = false, IsOneWay = true, ProtectionLevel = ProtectionLevel.None)]
        void DemarrerSession(String pseudo);

        [OperationContract(IsInitiating = false, IsTerminating = true, IsOneWay = true, ProtectionLevel = ProtectionLevel.None)]
        void FermerSession();

        [OperationContract(IsInitiating = false, IsTerminating = false, IsOneWay = true, ProtectionLevel = ProtectionLevel.None)]
        void getListeUtilisateur();

        [OperationContract(IsInitiating = false, IsTerminating = false, IsOneWay = true, ProtectionLevel = ProtectionLevel.None)]
        void EnvoyerMessage(String message);

         [OperationContract(IsInitiating = false, IsTerminating = false, IsOneWay = true, ProtectionLevel = ProtectionLevel.None)]
       void EnvoyerMessagePrive(String emmeteur, String destinataire,String message);

       // [OperationContract(IsInitiating = false, IsTerminating = false, IsOneWay = true)]
        //void Test();
        // TODO: Add your service operations here
    }


    // Use a data contract as illustrated in the sample below to add composite types to service operations.
   
    
}
